home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 28
/
Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso
/
Aminet
/
dev
/
lang
/
fpc09905c.lha
/
fpc
/
inc
/
exec.inc
< prev
next >
Wrap
Text File
|
1998-09-21
|
35KB
|
1,050 lines
TYPE
STRPTR = PChar;
ULONG = Longint;
LONG = longint;
APTR = Pointer;
BPTR = Longint;
BSTR = Longint;
pWord = ^Word;
pLongint = ^Longint;
pInteger = ^Integer;
TYPE
{ * List Node Structure. Each member in a list starts with a Node * }
pNode = ^tNode;
tNode = Packed Record
ln_Succ, { * Pointer to next (successor) * }
ln_Pred : pNode; { * Pointer to previous (predecessor) * }
ln_Type : Byte;
ln_Pri : Shortint; { * Priority, for sorting * }
ln_Name : STRPTR; { * ID string, null terminated * }
End; { * Note: Integer aligned * }
{ * minimal node -- no type checking possible * }
pMinNode = ^tMinNode;
tMinNode = Packed Record
mln_Succ,
mln_Pred : pMinNode;
End;
{ *
** Note: Newly initialized IORequests, and software interrupt structures
** used with Cause(), should have type NT_UNKNOWN. The OS will assign a type
** when they are first used.
* }
{ *----- Node Types for LN_TYPE -----* }
Const
NT_UNKNOWN = 0;
NT_TASK = 1; { * Exec task * }
NT_INTERRUPT = 2;
NT_DEVICE = 3;
NT_MSGPORT = 4;
NT_MESSAGE = 5; { * Indicates message currently pending * }
NT_FREEMSG = 6;
NT_REPLYMSG = 7; { * Message has been replied * }
NT_RESOURCE = 8;
NT_LIBRARY = 9;
NT_MEMORY = 10;
NT_SOFTINT = 11; { * Internal flag used by SoftInits * }
NT_FONT = 12;
NT_PROCESS = 13; { * AmigaDOS Process * }
NT_SEMAPHORE = 14;
NT_SIGNALSEM = 15; { * signal semaphores * }
NT_BOOTNODE = 16;
NT_KICKMEM = 17;
NT_GRAPHICS = 18;
NT_DEATHMESSAGE = 19;
NT_USER = 254; { * User node types work down from here * }
NT_EXTENDED = 255;
{
This file defines Exec system lists, which are used to link
various things. Exec provides several routines to handle list
processing (defined at the bottom of this file), so you can
use these routines to save yourself the trouble of writing a list
package.
}
Type
{ normal, full featured list }
pList = ^tList;
tList = Packed record
lh_Head : pNode;
lh_Tail : pNode;
lh_TailPred : pNode;
lh_Type : Byte;
l_pad : Byte;
end;
{ minimum list -- no type checking possible }
pMinList = ^tMinList;
tMinList = Packed record
mlh_Head : pMinNode;
mlh_Tail : pMinNode;
mlh_TailPred : pMinNode;
end;
{ ********************************************************************
*
* Format of the alert error number:
*
* +-+-------------+----------------+--------------------------------+
* |D| SubSysId | General Error | SubSystem Specific Error |
* +-+-------------+----------------+--------------------------------+
* 1 7 bits 8 bits 16 bits
*
* D: DeadEnd alert
* SubSysId: indicates ROM subsystem number.
* General Error: roughly indicates what the error was
* Specific Error: indicates more detail
*********************************************************************}
const
{*********************************************************************
*
* Hardware/CPU specific alerts: They may show without the 8 at the
* front of the number. These are CPU/68000 specific. See 68$0
* programmer's manuals for more details.
*
*********************************************************************}
ACPU_BusErr = $80000002; { Hardware bus fault/access error }
ACPU_AddressErr = $80000003; { Illegal address access (ie: odd) }
ACPU_InstErr = $80000004; { Illegal instruction }
ACPU_DivZero = $80000005; { Divide by zero }
ACPU_CHK = $80000006; { Check instruction error }
ACPU_TRAPV = $80000007; { TrapV instruction error }
ACPU_PrivErr = $80000008; { Privilege violation error }
ACPU_Trace = $80000009; { Trace error }
ACPU_LineA = $8000000A; { Line 1010 Emulator error }
ACPU_LineF = $8000000B; { Line 1111 Emulator error }
ACPU_Format = $8000000E; { Stack frame format error }
ACPU_Spurious = $80000018; { Spurious interrupt error }
ACPU_AutoVec1 = $80000019; { AutoVector Level 1 interrupt error }
ACPU_AutoVec2 = $8000001A; { AutoVector Level 2 interrupt error }
ACPU_AutoVec3 = $8000001B; { AutoVector Level 3 interrupt error }
ACPU_AutoVec4 = $8000001C; { AutoVector Level 4 interrupt error }
ACPU_AutoVec5 = $8000001D; { AutoVector Level 5 interrupt error }
ACPU_AutoVec6 = $8000001E; { AutoVector Level 6 interrupt error }
ACPU_AutoVec7 = $8000001F; { AutoVector Level 7 interrupt error }
{ ********************************************************************
*
* General Alerts
*
* For example: timer.device cannot open math.library would be $05038015
*
* Alert(AN_TimerDev|AG_OpenLib|AO_MathLib);
*
********************************************************************}
CONST
{ ------ alert types }
AT_DeadEnd = $80000000;
AT_Recovery = $00000000;
{ ------ general purpose alert codes }
AG_NoMemory = $00010000;
AG_MakeLib = $00020000;
AG_OpenLib = $00030000;
AG_OpenDev = $00040000;
AG_OpenRes = $00050000;
AG_IOError = $00060000;
AG_NoSignal = $00070000;
AG_BadParm = $00080000;
AG_CloseLib = $00090000; { usually too many closes }
AG_CloseDev = $000A0000; { or a mismatched close }
AG_ProcCreate = $000B0000; { Process creation failed }
{ ------ alert objects: }
AO_ExecLib = $00008001;
AO_GraphicsLib = $00008002;
AO_LayersLib = $00008003;
AO_Intuition = $00008004;
AO_MathLib = $00008005;
AO_DOSLib = $00008007;
AO_RAMLib = $00008008;
AO_IconLib = $00008009;
AO_ExpansionLib = $0000800A;
AO_DiskfontLib = $0000800B;
AO_UtilityLib = $0000800C;
AO_KeyMapLib = $0000800D;
AO_AudioDev = $00008010;
AO_ConsoleDev = $00008011;
AO_GamePortDev = $00008012;
AO_KeyboardDev = $00008013;
AO_TrackDiskDev = $00008014;
AO_TimerDev = $00008015;
AO_CIARsrc = $00008020;
AO_DiskRsrc = $00008021;
AO_MiscRsrc = $00008022;
AO_BootStrap = $00008030;
AO_Workbench = $00008031;
AO_DiskCopy = $00008032;
AO_GadTools = $00008033;
AO_Unknown = $00008035;
{ ********************************************************************
*
* Specific Alerts:
*
********************************************************************}
{ ------ exec.library }
AN_ExecLib = $01000000;
AN_ExcptVect = $01000001; { 68000 exception vector checksum (obs.) }
AN_BaseChkSum = $01000002; { Execbase checksum (obs.) }
AN_LibChkSum = $01000003; { Library checksum failure }
AN_MemCorrupt = $81000005; { Corrupt memory list detected in FreeMem }
AN_IntrMem = $81000006; { No memory for interrupt servers }
AN_InitAPtr = $01000007; { InitStruct() of an APTR source (obs.) }
AN_SemCorrupt = $01000008; { A semaphore is in an illegal state
at ReleaseSempahore() }
AN_FreeTwice = $01000009; { Freeing memory already freed }
AN_BogusExcpt = $8100000A; { illegal 68k exception taken (obs.) }
AN_IOUsedTwice = $0100000B; { Attempt to reuse active IORequest }
AN_MemoryInsane = $0100000C; { Sanity check on memory list failed
during AvailMem(MEMF_LARGEST) }
AN_IOAfterClose = $0100000D; { IO attempted on closed IORequest }
AN_StackProbe = $0100000E; { Stack appears to extend out of range }
AN_BadFreeAddr = $0100000F; { Memory header not located. [ Usually an
invalid address passed to FreeMem() ] }
AN_BadSemaphore = $01000010; { An attempt was made to use the old
message semaphores. }
{ ------ graphics.library }
AN_GraphicsLib = $02000000;
AN_GfxNoMem = $82010000; { graphics out of memory }
AN_GfxNoMemMspc = $82010001;